package com.yswee.mallnavi.activity;

import android.content.Intent;
import android.os.Bundle;

import com.yswee.framework.utils.ViewInject;
import com.yswee.framework.widget.base.WebView;
import com.yswee.mallnavi.R;
import com.yswee.mallnavi.activity.base.CardActivity;
import com.yswee.mallnavi.context.ContextConstant;
import com.yswee.mallnavi.view.info.IndexView;

public class InfoActivity extends CardActivity {

    @ViewInject
    private IndexView uvindex;

    private int mTabIndex;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_info;
    }

    @Override
    protected void onQueryArguments(Intent intent) {
        super.onQueryArguments(intent);
        mTabIndex = intent.getIntExtra(ContextConstant.INTENT_INDEX, 0);
    }

    @Override
    protected void onBindListener() {
        super.onBindListener();
    }

    @Override
    protected void onApplyData() {
        super.onApplyData();
        if (mTabIndex > 0) {
            uvindex.setInitializeTabIndex(mTabIndex);
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        WebView.destroyWebview();
    }
}
